<?php $photos = Doctrine::getTable('Image')->fetchall(array('limit'=>20))?>

<div class="gn_box">
  <div id="gn-widget-head-7" class="gn_box_head">
    <div class="gn_box_head_title" style="padding-left:0;color:#000;">
      <?php echo image_tag('icons/SuperAlbumIcon.png', array('align'=>"absmiddle"))?>&nbsp;
      <?php echo link_to('Шинээр нэмэгдсэн зургууд', '@homepage', array('style'=>'color:#000;'))?>
    </div>
  </div>

  <div style="padding:0;width:1000px;height:140px;position:relative;">
    <div class="infiniteCarousel">
      <div style="overflow:hidden;position:relative;height:140px;" class="wrapper" id="photos-slider">
          <ul>
            <?php foreach ($photos as $photo):?>
              <li style="width:120px;height:140px;display:block;">
                <a href="/tlg13/uploads/gallery/<?php echo $photo->getFullPath()?>" title="<?php echo $photo?>">
                  <?php echo image_tag('/uploads/gallery/'.$photo->getFullPath(120), array('alt'=>$photo, 'title'=>$photo, 'style'=>'max-width:120px;max-height:120px;'))?>
                  <span style="font-size:10px;margin:0 5px;"><?php echo $photo?></span>
                </a>
              </li>
            <?php endforeach?>
          </ul>
      </div><!--wrapper-->
    </div><!--infiniteCarousel-->
  </div>
</div>

<br clear="all">

<script type="text/javascript">
$(document).ready(function () {
  $('.infiniteCarousel').infiniteCarousel();
});

$(function() {
	$('#photos-slider a').lightBox();
});
</script>